// 饿汉模式实现单例模式
class Singleton {
    // 类加载的时候就创建实例
    private static  Singleton instance = new Singleton();

    // 设为私有, 使类外不能new
    private Singleton() {}

    public static Singleton getInstance() {
        return instance;
    }
}
public class ThreadDemo15 {
}
